package com.fengwei.config;

import com.fengwei.bean.DataSourcePoolManager;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * 连接池管理者
 */
@Configuration
public class DataSourcePoolManagerConfig {
    private static final Logger logger = LoggerFactory.getLogger(DataSourcePoolManagerConfig.class);

    /**
     * 连接池的manager
     */
    @Bean(name = "dataSourcePoolManager")
    public DataSourcePoolManager genDataSourcePoolManager() {
        DataSourcePoolManager dataSourcePoolManager = new DataSourcePoolManager();
        logger.info("{} DataSourcePoolManager has been created!", "dataSourcePoolManager");
        return dataSourcePoolManager;
    }

}
